#pragma once
#include "DWindow.h"
#include "DDevice.h"
#include "DInput.h"
#include "DTextureManager.h"
#include "DFont.h"

//////////////////////////////////////////////////////////////////////////
// Name : DCore
// Desc : 
// Date : [3/11/2012]
//////////////////////////////////////////////////////////////////////////
class DCore : public DWindow 
{
protected:
// Member Data 	
	D3DCOLOR			m_BgColor;

	LPDIRECT3DDEVICE9	m_pDevice;
	DInput*				m_pInput;
	DDevice*			m_Dev;
	DTextureManager*	m_TextureManager;
	DFont				m_Font;

public:
	DCore();
	~DCore();

public:
// Member Method
	virtual bool InitEngine();
	virtual void Run();

	void CoreRun();
	bool CoreInit();
	bool CoreFrame();
	bool CoreRender();
	bool CoreRelease();

	virtual bool PreCoreInit();
	virtual bool Init() = 0;
	virtual bool PostCoreInit();

	virtual bool PreCoreFrame();
	virtual bool Frame() = 0;
	virtual bool PostCoreFrame();

	virtual bool PreCoreRender();
	virtual bool Render() = 0;
	virtual bool PostCoreRender();

	virtual bool PreCoreRelease();
	virtual bool Release() = 0;
	virtual bool PostCoreRelease();

};